package com.fillifesoft.magicHitter.model;

public class NumberVo implements Comparable<NumberVo> {
	
	public int number;
	public int count;
	
	public NumberVo(int number) {
		this.number = number;
		this.count = 0;
	}
	
	public void addCount() {
		count++;
	}
	
	public String toString() {
		return String.format("number : [%d], count : [%d]",  number, count);
	}

	public int compareTo(NumberVo o) {
		if(this.number > o.getNumber()) {
			return 1;
		}
		else if(this.number < o.getNumber()) {
			return -1;
		}
		return 0;
	}
	
	public int getNumber() {
		return number;
	}
	public void setNumber(int number) {
		this.number = number;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
}
